const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const terser = require('terser-webpack-plugin');
module.exports = {
	entry: {
		'request': './index.ts'
	},
	resolve: {
		extensions: ['.js', '.ts', '.json'],
	},
	output: {
		filename: '[name].js',
		libraryTarget: 'umd',
		path: path.resolve(__dirname, 'dist'),
	},
	module: {
		rules: [
			{
				test: /\.tsx?$/,
				use: 'ts-loader',
				exclude: /node_modules/
			}
		]
	},
	plugins: [new CleanWebpackPlugin(), new terser()],
	mode: 'none'
}